<% layout('/layouts/default.html', {title: '查看内容'}){ %>
<div class="article">
    <h1 id="title">${content.title}</h1>
    <span><a href="#" id="createBy">${content.createByName}</a><kk id="date">${content.createDate,dateFormat='yyyy-MM-dd HH:mm'}</kk></span>
    <span id="content">${content.content}</span>
</div>
<% } %>
<style>
    html{
        font-size: 54.8px;
    }
    body{
        max-width: 750Px;
        font-size: 16Px;
        background: #fff;
        position: relative;
    }

    @media (min-width: 750px) {
        body {
            margin: 0 auto;
            width: 750px;
        }
    }

    .article{
        width: 100%;
        padding: 0.3rem 3%;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }

    .article span {
        font-size: 0.22rem;
        color: #b5b5b5;
        display: block;
        line-height: 1.7;
        margin-bottom: 0.3rem;
    }

    .article h1 {
        font-size: 0.38rem;
        color: #313131;
        font-weight: bold;
        line-height: 1.4;
        margin-bottom: 0.2rem;
    }

    .article span a {
        color: #555b9b;
        padding-right: 0.2rem;
    }

    .article p {
        font-size: 0.26rem;
        color: #303030;
        text-align: justify;
        line-height: 1.7;
        margin-bottom: 0.3rem;
    }

    p span{
        font-family: 微软雅黑, "Microsoft YaHei";
        font-size: 18px;
    }

    .article img {
        width: 100%;
        display: block;
        margin-bottom: 0.3rem;
    }
</style>
<script>
if(!js.getParam("id")){
    $("#content").html(js.curWin.UE.instants['ueditorInstant0'].getContent());
    $("#title").html($("#title",js.curWin.document).val());
    $("#createBy").html("${@UserUtils.getUser().getUserName()}");
    $("#date").html(js.formatDate(new Date(), "yyyy-MM-dd HH:mm"));
}
</script>

